package hfu.pm.entities;

import java.util.Date;

import javax.persistence.*;

import com.googlecode.objectify.Key;

public class Contact {
	@Id
	Long id;

	Key<Account> account;
	Key<Account> friend;
	
	String name;
	
	boolean active;
	
	Date timestamp;

	public Contact() {
		timestamp = new Date(System.currentTimeMillis());
	}

	public Long getId() {
		return id;
	}

	public Key<Account> getAccount() {
		return account;
	}

	public void setAccount(Key<Account> account) {
		this.account = account;
	}

	public Key<Account> getFriend() {
		return friend;
	}

	public void setFriend(Key<Account> friend) {
		this.friend = friend;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	public void setTimestamp() {
		this.timestamp = new Date(System.currentTimeMillis());
	}
	
	public void setFriendName(String friendName) {
		this.name = friendName;
	}
	
	public String getFriendName() {
		return this.name;
	}
}
